package com.ag.wzp.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import com.ag.bean.TbDept;
import com.ag.bean.TbDeptType;
import com.ag.bean.TbDisposalAdvice;
import com.ag.bean.TbEventLevel;
import com.ag.bean.TbEventSource;
import com.ag.bean.TbEventStatus;
import com.ag.bean.TbEventType;
import com.ag.dao.TbDeptDAO;
import com.ag.dao.TbDisposalAdviceDAO;
import com.ag.dao.TbEventLevelDAO;
import com.ag.dao.TbEventSourceDAO;
import com.ag.dao.TbEventStatusDAO;
import com.ag.dao.TbEventTypeDAO;
import com.ag.wzp.dao.WzpTbDisposalAdviceDAO;
import com.ag.zhh.dao.DeptDAO;
import com.ag.zhh.vo.Dept;
@Service("eventBaseService")
public class EventBaseService {
	private static Logger logger = Logger.getLogger(EventBaseService.class);
	@Resource(name="TbEventLevelDAO")
	private TbEventLevelDAO eventLevelDAO;
	@Resource(name="TbEventStatusDAO")
	private TbEventStatusDAO eventStatusDAO;
	@Resource(name="TbEventTypeDAO")
	private TbEventTypeDAO eventTypeDAO;
	@Resource(name="TbEventSourceDAO")
	private TbEventSourceDAO eventSourceDAO;
	//@Resource(name="TbDeptDAO")
	//private TbDeptDAO deptDAO;
	@Resource(name="wzpTbDisposalAdviceDAO")
	private WzpTbDisposalAdviceDAO disposalAdviceDAO;
	@Resource(name="DeptDAO")
	private DeptDAO deptDAO;
	
	public List<TbEventLevel> getAllEventLevel() {
		logger.info("findAll eventLevel ");
		return this.eventLevelDAO.findAll();
	}

	public List<TbEventStatus> getAllEventStatus() {
		logger.info("findAll eventStatus ");
		return this.eventStatusDAO.findAll();
	}

	public List<TbEventType> getAllEventType() {
		logger.info("findAll eventType ");
		return this.eventTypeDAO.findAll();
	}

	public List<TbEventSource> getAllEventSource() {
		logger.info("findAll eventSource ");
		return this.eventSourceDAO.findAll();
	}

	public List<Dept> getAllDept() throws Exception{
		logger.info("findAll dept");
		//return this.deptDAO.findAll();
		TbDeptType dt = new TbDeptType();
		dt.setDtId("0001");
		dt.setDtName("药监内部");
		//return this.deptDAO.findByDeptType(dt);
		return null;
	}

	public List<TbDisposalAdvice> findAllDAByEId(String eId) {
		logger.info("find DAByEId");
		return this.disposalAdviceDAO.findAllDAByEId(eId);
	}
	
}
